package com.zatech.cgnci.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zatech.cgnci.project.dto.*;
import com.zatech.cgnci.project.entity.CgnciClaimReserveDO;
import com.zatech.cgnci.project.vo.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 准备金记录表 服务类
 * </p>
 *
 * @author Generator
 * @since 2024-12-23
 */
public interface CgnciClaimReserveService extends IService<CgnciClaimReserveDO> {

    /**
     * 准备金计提
     */

    Long addTask(CgnciClaimReserveDTO reserveDTO, boolean flag);


    String saveOrUpdateReserve(CgnciClaimReserveDTO reserveDTO);

    /**
     * 准备金调整
     */
    void adjust(CgnciClaimReserveDTO reserveDTO, boolean flag);

    /**
     * 获取准备金详情
     */
    CgnciClaimReserveVO detail(String caseNo, String isSendBack);

    CgnciClaimReserveVO detailTask(String taskNo);

    CgnciClaimReserveVO detail(String caseNo);

    void verify(String caseNo);

    /**
     * 审核通过
     */
    void approve(CgnciClaimCaseCheckDTO flowTaskDTO);

    /**
     * 审核退回
     */
    void back(CgnciClaimCaseCheckDTO flowTaskDTO);

    /**
     * 注销
     */
    void cancel(String taskId);

    /**
     * 获取操作日志
     */
    List<ApprovalRecordVO> log(Long caseId);

    IPage<ReserveDetailTaskVO> reserveDetail(ReserveDetailQueryDTO req);


    /**
     * 历史赔案准备金汇总查询
     *
     * @param caseNo
     * @return
     */
    BigDecimal reserveCollect(String caseNo, Date periodDnd, String isOd);

}
